<!--{template header}--><!--弹窗--> 
<link href="static/css/public.css" rel="stylesheet">
<div class="clearfix box pad5 winbody" style='width:600px'>


 <!--messages消息 start-->
 
  <div class="messages m_infor" id="notice_id">
    <span class="icon16">warning</span>
		{$_lang['please_carefully_select_merchandise']}。
   </div>


   	<table width="100%">
	  {if $data}
	      	<tr>
	      		<td>
	      			<div class="page clearfix">
	      			<a href='javascript:void(0);' onclick="pageSlide(this,'pre');" vp='0' id='page_pre'>
	      				{$_lang['prev_page']}
					</a>
					<a href='javascript:void(0);'  onclick="pageSlide(this,'next');" vp='2' id='page_next'>{$_lang['next_page']}</a>
					</div>
				</td>
			</tr>
			<tr>
			
	     		 <td>
	     		 	<table id='page_1' width="100%">
	     		 		{loop $data $k $v}
					      	{if $k==0||$k==3}<tr>{/if}
					      		<td style="border:1px solid #ccc">
					      			<div class="po_re">
					      				<div class="po_ab">
						      			<input  type="radio" id="g_1_{$k}" name="tao_good"  detail="{$v['detail_url']}" pic="{$v['pic_url']}"
							 				pric="{$v['price']}" onclick="postPro(this);" title="{$v['title']}" />
										</div>
						      			<div class='t_c p_img'>
						      				<label for="g_1_{$k}"><img src="{$v['pic_url']}" width="100" alt="{$v['title']}" detail="{$v['detail_url']}" pic="{$v['pic_url']}"
							 				pric="{$v['price']}" onclick="postPro(this);"  title="{$v['title']}"/></label>
										</div>
										<div class='clear'></div>
										<div class='goods_title'>
											<strong class="block">
											<a href='{$v['detail_url']}' target="_blank" class='p_title' title='{$v['title']}'>
												<!--{eval echo kekezu::cutstr($v['title'],24)}-->
											</a>
											</strong>
											
											<span class='red p_price'>{$v['price']}</span>{$_lang['yuan']}
											<span class=''>
												{$v['location']['state']}{$v['location']['city']}
						      				</span>
										</div>	
										
									</div>
								</td>
					      	{if $k==2||$k==5}</tr>{/if}
						{/loop}
					</table>
				</td>

	      	</tr>
      {else}
	  	<tr>
	      	<td>
	      		<span class="bf7 clearfix t_c font14b">{$_lang['no_goods']}</span>
			</td>
   	 	</tr>
      {/if}
	 </table>



<script type="text/javascript">
	var pageNo=1;
	var P;
	function pageSlide(obj,direc){
		var nowPageZone = $('#page_'+pageNo);
			p           = parseInt($(obj).attr('vp'));
			preP  		= p-1;
			nextP 		= p+1;
		var toPageZone  = $('#page_'+p);
		var canR = true;
			direc=='pre'&&p==0?canR=false:'';
			if(canR){
				if(toPageZone.length){
					toPageZone.show().siblings().hide();
				}else{
					if(P!=p){
					var newPageZone = $("<table id='page_"+p+"' class='pad10' width='100%'></table>");
						newPageZone.append("<tr><td class='t_c'>{$_lang['data_requesting']}</td></tr>").insertBefore(nowPageZone);
						P=p;
						var nick = '{$nick}';
						var url ="{$_K['siteurl']}/index.php?do=ajax&view=task&ajax=tao_goods";
							url+='&page_no='+p+'&nick='+nick;
						nowPageZone.hide();	
						newPageZone.load(url);
						direc=='pre'?--pageNo:++pageNo;					
					}
				}
				$('#page_pre').attr('vp',preP);
				$('#page_next').attr('vp',nextP);
			}
	}
	function postPro(obj){
		var obj = $(obj);
		var str  = "{$_lang['good_name']}:"+$(obj).attr('title');
			str  += "\n{$_lang['good_price']}:"+obj.attr('pric');
			assign==1?str+="\n{$_lang['good_url']}:"+obj.attr('detail'):'';
			if(obj.attr('pic')!=''){
				pic = obj.attr('pic');
				$('#div_wb_img').show().find('strong').html("{$_lang['good_pic']}：");
				$('#div_wb_img img#wb_img').attr('src',pic);
				$("input[name='wb_img']").val(pic);
			}
			$('#prom_url').val(obj.attr('detail'));
			$('#tar_content').html(str);
		hideWindow('tao_goods');
	}
</script>
<!--{template footer}-->